package com.qfedu.service;

import com.qfedu.dao.CollectDao;
import com.qfedu.entity.Collect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CollectServiceImpl implements CollectService{

    @Autowired
    private CollectDao collectDao;
    // 返回的指定用户ID收藏列表
    @Override
    public List<Collect> findAllCollect(int userId) {
        List<Collect> allCollect = collectDao.findAllCollect(userId);
        return allCollect;
    }

    @Override
    public int deleteCollect(int userId, int songId) {
        return collectDao.deleteCollect(userId, songId);
    }
}
